/*
 * history.h
 *
 *  Created on: 2009-8-7
 *      Author: wyb
 */

#ifndef HISTORY_H_
#define HISTORY_H_

#include "fft.h"
#include "util.h"
#include <stdlib.h>
#include <math.h>

//历史数据过滤异常点
#define ERROR 4
#define REVISE 2
#define ERROR_N 500

//历史数据的周期
#define LIMIT_PERCENT 0.3
#define MIN_FREQUENCY 10

//历史数据的下限
#define LIMIT_NUM 500

struct double_array *analyze_history(struct fft_cosine *history_cosine, int N);

void history_filter(struct double_array *history);

#endif /* HISTORY_H_ */
